GBML manual / Core

profile_reset

Forgets the worst frames so far, so profile_worst starts counting again from nothing.

Works differently on Game Boy - The Game Boy has no frame profiler: profile_enabled says false and every profile number reads 0.

Works differently on Game Boy Color - The Game Boy Color has no frame profiler: profile_enabled says false and every profile number reads 0.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

profile_reset()

Returns

Nothing.

Description

Forgets the worst frames so far, so profile_worst starts again from nothing. The averages and the last-frame numbers are not touched.

A good time to call it is when a new room starts, so the worst numbers you read in a room belong to that room and not to something that happened ten minutes ago. It does nothing when the profiler is off.

Example

if (btn_pressed(BTN_SELECT)) {
    profile_reset();
}

Pressing SELECT clears the worst-frame numbers.

On the GBA

Does nothing when the profiler is off. A good moment to call it is when a new room starts, so a room's worst frame is its own.

See also: profile_worst